package cn.i7baozh.boot.learn.thirdproperty;

import lombok.Getter;
import org.springframework.boot.context.config.ConfigDataResource;
import org.springframework.boot.context.config.Profiles;

/**
 * 假设配置是从数据库读取到的
 * @author zhangbaoqi532
 * @date 2025/2/24
 */
public class MyPropertyDataResource extends ConfigDataResource {

    /**
     * 数据库表名
     */
    @Getter
    private String tableName;
    @Getter
    private final Profiles profiles;

    public MyPropertyDataResource(String tableName, Profiles profiles) {
        this.tableName = tableName;
        this.profiles = profiles;
    }
}
